package com.zzb.inherit;

public class Washer extends Appliances{//子类   洗衣机类

    //属性
    private String motor;//电机类型
    private String capacity;//容量


    //构造器
    public Washer() {
    }

    public Washer(String motor, String capacity) {
        this.motor = motor;
        this.capacity = capacity;
    }

    public Washer(String brand, String model, String color, double price, String motor, String capacity) {
        super(brand, model, color, price);
        this.motor = motor;
        this.capacity = capacity;
    }

    public String getMotor() {
        return motor;
    }

    public void setMotor(String motor) {
        this.motor = motor;
    }

    public String getCapacity() {
        return capacity;
    }

    public void setCapacity(String capacity) {
        this.capacity = capacity;
    }

    @Override
    public String toString() {
        return "Washer{" +
                "brand='" + getBrand() + '\'' +
                ", model='" + getModel() + '\'' +
                ", color='" + getColor() + '\'' +
                ", price=" + getPrice() + '\'' +
                "motor='" + motor + '\'' +
                ", capacity='" + capacity + '\'' +
                '}';
    }
}
